package petrochina.company.electric.http.api;

import com.hjq.http.config.IRequestApi;
import com.ut.ble.BleDevice;

import java.util.Objects;

/**
 *    desc   : 获取Ble蓝牙设备列表
 */
public final class BleDeviceListApi implements IRequestApi {

    @Override
    public String getApi() {
        return "equip/getOperequip";
    }

//    private int type;
//    private long code;
//
//    public BleDeviceListApi setType(int type) {
//        this.type = type;
//        return this;
//    }
//
//    public BleDeviceListApi setCode(long code) {
//        this.code = code;
//        return this;
//    }

    public final static class Bean {
        private long id;
        private String name;
        private String code;
        private int devType;
        private int orgId;
        private String bluetookthAddress;
        private String buildDate;
        private BleDevice device;

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public int getDevType() {
            return devType;
        }

        public void setDevType(int devType) {
            this.devType = devType;
        }

        public int getOrgId() {
            return orgId;
        }

        public void setOrgId(int orgId) {
            this.orgId = orgId;
        }

        public String getBluetookthAddress() {
            return bluetookthAddress;
        }

        public void setBluetookthAddress(String bluetookthAddress) {
            this.bluetookthAddress = bluetookthAddress;
        }

        public String getBuildDate() {
            return buildDate;
        }

        public void setBuildDate(String buildDate) {
            this.buildDate = buildDate;
        }

        public BleDevice getDevice() {
            return device;
        }

        public void setDevice(BleDevice device) {
            this.device = device;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Bean)) return false;
            Bean bean = (Bean) o;
            return getBluetookthAddress().equals(bean.getBluetookthAddress());
        }

        @Override
        public int hashCode() {
            return Objects.hash(getBluetookthAddress());
        }

        @Override
        public String toString() {
            return "Bean{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    ", code='" + code + '\'' +
                    ", devType=" + devType +
                    ", orgId=" + orgId +
                    ", bluetookthAddress='" + bluetookthAddress + '\'' +
                    ", buildDate='" + buildDate + '\'' +
                    '}';
        }
    }
}